<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2019/3/18 0018
 * Time: 21:29
 */
class Log
{
    public  static function connect($socket){
        //获取远程类似主机的ip地址
        socket_getpeername($socket,$addr);
        echo "[*]$addr connected\n";
    }
    public static function disconnet($socket){
        //获取本地socket的ip地址
        socket_getpeername($socket,$addr);
        echo "[*]$addr closed\n";
    }
}